package user;

import book.BookList;
import operation.ExitOperation;
import operation.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-26
 * Time: 9:16
 */
public abstract class User {
    protected String name; //用户名
    protected IOperation[] iOperations;//操作组合在一起调用

    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doIOperation(int choice, BookList bookList){
        this.iOperations[choice].work(bookList);
    }

}
